import re


def parse_fan_info(self, raw_output):
    """解析FAN信息"""
    ret_info = {}
    for line in raw_output:
        if line.strip() == '':
            continue
        if 'Current mode:' in line:
            ret_info['mode'] = line.strip().split(':')[1]
        if 'Manual fan level' in line and (re.search(r'\d+', line) is not None):
            ret_info['fan_level'] = re.search(r'\d+', line).group()
        if 'Fan' in line:
            ret_info['fan_level'] = re.search(r'Fan(\d):(\W)(\d+)', line).group(3)

    return ret_info
